<?php $this->load->helper('form'); ?>
<div style="float:left; width:100%;">
    <h1>Description</h1>
    <p>
          This page allows you to add Cruises or Events and also will process photos for past events.  
    </p>
    <h1>Instructions</h1>
    <p>
    <div style="margin-left: 15px;">
        <ol>
            <li>Ftp your cruise photos to the directory <b><?php echo GALLERY_TEMP_UPLOAD_DIRECTORY;?>.</b></li>
            <li>Come back here and fill out the form below.</b></li>
            <div style="margin-left: 15px;">
                <ol>
                    <li>If you select "New Cruise", then a new cruise record will be created.  Fill out all the fields associated with that cruise.</li>
                    <li>If you select "Existing Cruise", then select a cruise from the combo box.</li>
                    <li>Click 'Go'</li>
                </ol>
            </div>
        </ol>
        <b>NOTE:</b>  If you just want to add an event, do not ftp files to the temp directory and add fill in the fields on the form below.
    </div>
    <h1>Cruise Form</h1>
    <div style="margin-top:15px;">
    <?php if ($image_count > 0): ?>
        <p>
            Images found:&nbsp;&nbsp;<?php echo $image_count; ?>
        </p>
        
        <?php 
            $attributes		=	array('id'=>'_cruiseGalleryForm');
            echo form_open('cruises/store_images_in_cruise', $attributes);
            echo form_fieldset('','class = "general-info-fieldset"');
            echo form_label('Cruise Selection:', '_nickname');
            echo form_dropdown('cruise_selection', $cruise_selection_list, '0'); 
        ?>

        <br class="clear" />
        <input name="save" id="_processImages" class ="save-button" type="submit" value="Process Images for Selected Cruise"/>
        <?php echo form_fieldset_close(); ?>
        <?php echo form_close(); ?>

    <?php else : ?>
        No images found.  Assuming you only want to add an event.
    <?php endif; ?>
    
    <?php 
            $attributes		=	array('id'=>'_cruiseGalleryForm');
            $hidden_fields	=	array('has_images' => ($image_count > 0) );
            echo form_open('cruises/add_new_cruise', $attributes, $hidden_fields);
    ?>
    
    
    <?php echo form_fieldset('','class = "general-info-fieldset"');?>
    <?php echo form_label('Cruise Date:', '_cruiseDate');?>
    <?php echo form_input('cruise_date', '');?>
    <br class="clear" />
    <?php echo form_label('Name:', '_name');?>
    <?php echo form_input('name', '');?>
    <br class="clear" />
    <?php echo form_label('Place:', '_place');?>
    <?php echo form_input('place', '');?>
    <br class="clear" />
    <?php echo form_label('Note:', '_note');?>
    <textarea type="text" id="_note" name = "note" class="editable" autocomplete="off" rows="5" cols="60"></textarea>
    <br class="clear" />
    
    
    <br class="clear" />
    <input name="save" id="_processImages" class ="save-button" type="submit" value="<?php echo $image_count > 0 ? 'Process Images and a' :'A' ; ?>dd new Cruise"/>
    <?php echo form_fieldset_close(); ?>
    
    
    <?php echo form_close(); ?>
    </p>  
    </div>
</div>
    <div style="clear:both;"></div>
